In interactive programming environments, there is often a need for the interactive programming environment to interact with existing components and applications, and those components and applications do not necessarily originate with the interactive programming environment. There are a number of different approaches utilized to enable such interaction. In many circumstances, it is necessary for a primary software application executing on a hardware component to communicate with a second hardware component (either located in the same hardware system or external), or a second software application or component executing on that hardware. For example, the primary software application can execute on a personal computer and communicate with the secondary hardware. The secondary hardware components can include internal computer boards, external instruments, a second computer system, an embedded device, or the like.
The primary software application can be a modeling or simulation application for modeling a system, such as a control system or dynamic system. For example, MATLAB®, provided by The Mathworks, Inc. of Natick, Mass., may serve as the primary software application. MATLAB® is an interactive programming application that can implement a variety of computing tasks in engineering and science. MATLAB® has the ability to execute other executable programs. Some of the tasks that MATLAB® can perform range from data acquisition and analysis to application development. The MATLAB® environment integrates mathematical computing, visualization, and technical programming language. MATLAB® includes built-in interfaces that provide access to and import data from instruments, files, and external databases and programs.
In addition, MATLAB® can integrate external routines written in C, C++, Fortran, and Java with MATLAB® applications. As such, MATLAB® provides an example of an interactive programming environment that can work in conjunction with C routines provided external to MATLAB®, including those provided by third party providers. Users of MATLAB®, and similar programs, often have the need to communicate with other software or hardware components using programs like MATLAB®.
Conventional solutions provide a level of compatibility for software application developers that need to communicate with different hardware components. However, the conventional solutions include several limitations relating to how each hardware component presents itself to the software developer in the form of a programming interface.
More specifically, Interchangeable Virtual Instrument (IVI) drivers, for example, provide a common application programming interface for many instruments, but are limited to those devices which have such a driver. Software component technologies, such as Microsoft's .NET, allow the use of software components, including those that interface with hardware components, that can publish their capabilities to provide a small degree of interface independence. However, such components must conform to a specific mechanism for publishing their capabilities. The existing solutions do not allow for the inclusion of legacy driver formats or component technologies, future technologies, mixed formats and component technologies, and arbitrary interfaces that do not conform to any current standard.
Another class of approaches to achieve compatibility concerns object models. With object models, a component must be written to be compliant with a specified interface. Microsoft Corporation's Component Object Model (COM), and the Object Management Group's Common Object Request Broker Architecture (CORBA), provide such interfaces.
A third example programming interface method is to create a way for the user to define the interfaces present in a shared library that was designed to be called from a standard programming language, such as the C programming language. A special document or library definition custom to the application must be created by the user (or additionally provided) that defines the interface to the library. There is no mechanism for automatically creating the special document, the custom library definition, or any form of library function interface that defines the interface to the library.
In many different computer environments, there is often a need for a software application to be able to call external functions that are not specifically designed for use with the software application. In many programming languages, there are groups of functions that can be called by any number of different software applications. One example programming language is the C programming language.